package org.shj.spring.boot.lang;

import java.util.IllegalFormatException;

/**
 * Created by xuwei on 2017/2/16.
 */
public interface ConvertFrom<E> {


    default <VO extends ConvertFrom<E>> VO convertFrom(E source) throws IllegalFormatException {
        if (source == null) {
            return null;
        }
        BeanMapper.deepCopy(source, this);
        return (VO) this;
    }
}
